*     ***************************************************************** *;
*     ***************************************************************** *;
*       File-Name:      tariff_cuts.do    		                        *;
*       Date:           12/28/2020                                      *;
*       Authora:        Baccini, Guidi, Poletti, and Yildirim           *;
*       Purpose:        Replication of "Trade Liberalization and Labor  *;
*						Market Institutions"                            *;                                                                      
*       Input Files:    tariff_cuts.dta		 					        *; 
*       Output Files:   tariff_cuts_logfile.log		                    *;
*       Machine:        Office                                          *;
*       Program: 		Stata 15                                        *;
*     ****************************************************************  *;
*     ****************************************************************  *;

* Setting initial commands
clear
clear matrix
clear mata
set maxvar 50000
set matsize 11000
set more off 

* Loading the dataset
*cd "Replication File"
use tariff_cuts, clear
log using tariff_cuts_logfile.log

* Figures A1 & A2
xtline tariff_cut_export if year>2002 & year<2015 & naics4<3261 & tariff_cut_export<30, i( naics4 ) t( year )
graph save Graph "C:\Users\lbacci\Dropbox\Projects\NNTT_VoC\Draft\LaTex\IO\Revisions\000 Check\FigureA1.gph", replace
graph save Graph "C:\Users\lbacci\Dropbox\Projects\NNTT_VoC\Draft\LaTex\IO\Revisions\000 Check\FigureA1.pdf", replace

xtline tariff_cut_export if year>2002 & year<2015 & naics4>=3261 & tariff_cut_export<30, i( naics4 ) t( year )
graph save Graph "C:\Users\lbacci\Dropbox\Projects\NNTT_VoC\Draft\LaTex\IO\Revisions\000 Check\FigureA2.gph", replace
graph save Graph "C:\Users\lbacci\Dropbox\Projects\NNTT_VoC\Draft\LaTex\IO\Revisions\000 Check\FigureA2.pdf", replace
